import request from '@/utils/request'

// 查询报修项目列表
export function listRepairProject(query) {
  return request({
    url: '/workorder/repairProject/list',
    method: 'get',
    params: query
  })
}

// 查询报修项目详细
export function getRepairProject(id) {
  return request({
    url: '/workorder/repairProject/' + id,
    method: 'get'
  })
}

// 新增报修项目
export function addRepairProject(data) {
  return request({
    url: '/workorder/repairProject',
    method: 'post',
    data: data
  })
}

// 修改报修项目
export function updateRepairProject(data) {
  return request({
    url: '/workorder/repairProject',
    method: 'put',
    data: data
  })
}

// 删除报修项目
export function delRepairProject(id) {
  return request({
    url: '/workorder/repairProject/' + id,
    method: 'delete'
  })
}

// 导出报修项目
export function exportRepairProject(query) {
  return request({
    url: '/workorder/repairProject/export',
    method: 'get',
    params: query
  })
}

export function treeselect(query) {
  return request({
    url: '/workorder/repairProject/treeselect',
    method: 'get',
    params: query
  })
}
